Steer file navigation to Glob/LS instead of find#32
Merged
Conversation
On large monorepos, reviews spend turns on denied `find` calls — locating files, listing directories, and cross-app consistency sweeps the review prompt asks for. A reproduced ht-platform review hit permission denials that were entirely `find`; on one run the production job logged 16, all of the same shape. find can't be allow-listed the way grep/jq/ls were: `find -exec` and `-delete` execute and mutate, so it breaks the read-only contract. The legitimate need — locating and listing files — is already served read-only by the Glob and LS tools. Point the model at those and note find is unavailable, so it stops probing and wasting turns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On large monorepos, reviews spend turns on denied
findcalls — locating files, listing directories, and the cross-app consistency sweeps the review prompt explicitly asks for ("search the rest of the codebase for similar implementations"). Reproducing an ht-platform review three times, every permission denial wasfind(8/8 across runs; zero git-subcommand or toolchain denials); the production job that prompted this logged 16, all the same shape. The run still passed — these are wasted turns absorbed by the budget — but they're pure waste.Unlike
grep/jq/ls,findcan't be added to the allow-list:find -execand-deleteexecute and mutate files, which breaks the read-only contract. The legitimate need — locating and listing files — is already served read-only by the Glob and LS tools. So this steers the model to those and statesfindis unavailable, so it stops probing.Type of Change
Testing Done
Prompt-only change to the shared review workflow; no functional/schema change. Validated the YAML parses. Root cause confirmed by reproducing an ht-platform PR review locally three times under the CI allow-list — all denials were
find; will confirm the reduction on live reviews.Checklist